package com.homwork;

public class ThreadOne2 {
    public static void main(String[] args) {
        ThreadOne to = new ThreadOne();
        to.start();
        for(int i =1; i<=100; i++){
            System.out.println(Thread.currentThread().getName()+"线程正在运行，当前打印数字"+i+"~~~~~~");
        }

    }
}
class ThreadOne extends Thread{
    @Override
    public void run() {
        for(int i = 1; i<=100; i++){
            this.setName("第二");
            System.out.println(this.getName()+"线程正在当前打印数字"+i+"========");
        }
    }
}